//UI of the main page (project view)
//= require <selectbox>
//= require <policies_ui>

GIS_Selectbox = Class.create(Selectbox, {
    policies_ : '',
    initialize: function(options) 
    {
        this.setOptions(options);
        $$('#choose-project-form input[type="submit"]').each(function(input){
            input.hide();
        });
        this.policies_ = new Policies_Ui();
        this.run();
    },
    checkList : function(event)
    {
        var topic_id = this.updateMenu(event);
        if(!this.catchButtonEvent(event) && topic_id === false)
            this.hideOpenMenus(event);
        if(topic_id !== false)
            this.updateDatatable(topic_id);
            
    },
    updateDatatable : function(t_id)
    {
        $('choose-project-form').submit();
    }
});

GIS_Selectbox.DEFAULT_OPTIONS = {
    class_name: 'selectbox',
    link_name: 'button',
    img_src : 'output/images/ajax-loader_big.gif'
};
